<?php
if(!isset($_SESSION['user'])){
redirect(LOGIN);
}

if($_GET['opt']=='scan'){
	$db=new db;
	$db->connect();
	$db->query("select id,name,alias,url from anime where scan_auto=1  order by id desc limit 0,1 ");
	if($db->num_rows()>0){
	 $data2=$db->fetchOne();
	 	
	}
	
	
	
	//echo "<pre>";
	//print_r($data);
	//echo "</pre>";

   	//Lay the loai 2, lay duoc list chuong, update view, update so chuong hien co,update view
	
	//HEADER TITLE,KEYWORD,DESCRIPION
	$data1['title']="Xem Anime Tong hop";
	$data1['mota']="Xem Anime Tong Hop";
	$data1['keyword']="Xem Anime Tong hop";

loadview('template/header_admin',$data1);
loadview("anime/scan",$data2);
loadview('template/footer_admin');
exit();
}else
if($_GET['opt']=='scan2'){


	$db=new db;
	$db->connect();
		$db->query("select id,name,alias,url from anime where scan_auto=1  order by id desc limit 0,1 ");
	if($db->num_rows()>0){
	 $data2=$db->fetchOne();
	 
	
	
	
	}
	
	
	
	//echo "<pre>";
	//print_r($data);
	//echo "</pre>";

   	//Lay the loai 2, lay duoc list chuong, update view, update so chuong hien co,update view
	
	//HEADER TITLE,KEYWORD,DESCRIPION
	$data1['title']="Xem Anime Tong hop";
	$data1['mota']="Xem Anime Tong Hop";
	$data1['keyword']="Xem Anime Tong hop";

loadview('template/header_admin',$data1);
loadview("anime/scan2",$data2);
loadview('template/footer_admin');
exit();


 //    loadview("template/right",$right);


}


?>